{% extends "base.html" %}
{% load mezzanine_tags keyword_tags article_tags %}

{% block meta_title %}{{ tag.title }}{% endblock %}

{% block meta_keywords %}{% metablock %}
    {{ tag.title }}
{% endmetablock %}{% endblock %}

{% block meta_description %}{% metablock %}

{% endmetablock %}{% endblock %}

{% block title %}
    <div class="article-title">
        <a href="{% url 'article_tag' tag=tag.title %}">{{ tag.title }}</a>
    </div>
{% endblock %}

{% block main %}

    {% for item in object_list %}
        <dl class="article-item">
            {% if item.cover %}
                <dt>
                    <img src="{{ MEDIA_URL }}{% thumbnail item.cover 110 75 95 %}" alt="{{ item.title }}"/>
                </dt>
            {% endif %}
            <dd>
                <p><strong>
                    <a href="{{ item.get_absolute_url }}">{{ item.title }}</a>
                </strong>
                    <small><span class="muted pull-right ">{{ item.publish_date|date }}</span></small>
                </p>

                <p class="article-summary">{{ item.description }}</p>
            </dd>
        </dl>
    {% endfor %}

    {% if page_obj.paginator.num_pages > 1 %}
        <div class="text-center">
            {% load bootstrap_toolkit %}
            {% bootstrap_pagination page_obj %}
        </div>
    {% endif %}
{% endblock %}
